/* 
 * File:   GenericContingencyMatrix.cpp
 * Author: Guilherme Monteiro
 * 
 */

#include "../headers/GenericMetricsVector.h"

GenericMetricsVector::GenericMetricsVector (string uAnsPath, string sAnsPath) {
    setUAnsPath(uAnsPath);
    setSAnsPath(sAnsPath);
}

GenericMetricsVector::GenericMetricsVector(const GenericMetricsVector& orig) {
}

GenericMetricsVector::~GenericMetricsVector() {
}

/**
 * Return false negative tax.
 * 
 * @return false negative tax.
 */
double GenericMetricsVector::getFN() {
    return this->FN;
}

/**
 * Sets false negative tax.
 * 
 * @param FN
 */
void GenericMetricsVector::setFN(double FN) {
    this->FN = FN;
}

/**
 * Return false positive tax.
 * 
 * @return false positive tax.
 */
double GenericMetricsVector::getFP() {
    return this->FP;
}

/**
 * Sets false positive tax.
 * 
 * @param FP
 */
void GenericMetricsVector::setFP(double FP) {
    this->FP = FP;
}

/**
 * Return true positive tax.
 * 
 * @return true positive tax.
 */
double GenericMetricsVector::getTP() {
    return this->TP;
}

/**
 * Sets true positive tax.
 * 
 * @param TP
 */
void GenericMetricsVector::setTP(double TP) {
    this->TP = TP;
}

/**
 * Return true negative tax.
 * 
 * @return true negative tax.
 */
double GenericMetricsVector::getTN() {
    return this->TN;
}

/**
 * Sets true negative tax.
 * 
 * @param TN
 */
void GenericMetricsVector::setTN(double TN) {
    this->TN = TN;
}

/**
 * Return false positive rate.
 * 
 * @return false positive rate.
 */
double GenericMetricsVector::getFPR() {
    return this->FPR;
}

void GenericMetricsVector::setUAnsPath(string uAnsPath) {
    if(!uAnsPath.empty())
        this->uAnsPath = uAnsPath;
}

string GenericMetricsVector::getUAnsPath() const {
    return uAnsPath;
}

void GenericMetricsVector::setSAnsPath(string sAnsPath) {
    if(!sAnsPath.empty())
        this->sAnsPath = sAnsPath;
}

string GenericMetricsVector::getSAnsPath() const {
    return sAnsPath;
}

/**
 * Sets false positive rate.
 * 
 * @param FPR
 */
void GenericMetricsVector::setFPR() {
    this->FPR = FP / (FP + TN);
}

/**
 * Return true positive rate.
 * 
 * @return true positive rate.
 */
double GenericMetricsVector::getTPR() {
    return this->TPR;
}

/**
 * Sets true positive rate.
 * 
 * @param TPR
 */
void GenericMetricsVector::setTPR() {
    this->TPR = TP / (TP + FN);
}


int GenericMetricsVector::getNumCellsSoft() {
    return this->numCellsSoft;
}

void GenericMetricsVector::setNumCellsSoft(int num) {
    this->numCellsSoft = num;
}

int GenericMetricsVector::getNumCellsUser() {
    return this->numCellsUser;
}

void GenericMetricsVector::setNumCellsUser(int num) {
    this->numCellsUser = num;
}